package com.redxun.controller;

import com.redxun.model.request.ClaimRequest;
import com.redxun.model.request.IndicatorsRequest;
import com.redxun.model.response.BaseResponse;
import com.redxun.model.response.ClaimPoJo;
import com.redxun.model.response.IndicatorsPoJo;
import com.redxun.service.IndicatorsReview;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/indicators")
@Api(tags = "指标接口")
public class IndicatorsController {
    @Autowired
    private IndicatorsReview indicatorsReview;

    @PostMapping("/batchReview")
    @ApiOperation(value = "指标审核接口", notes = "根据类型以及所选的列表进行审核数据变更")
    public BaseResponse<IndicatorsPoJo> batchReview(@RequestBody IndicatorsRequest request) {
        return indicatorsReview.batchReview(request);
    }
    @PostMapping("/claim")
    @ApiOperation(value = "指标认领接口", notes = "根据类型以及所选的列表进行指标认领")
    public BaseResponse<ClaimPoJo> claim(@RequestBody ClaimRequest request) {
        return indicatorsReview.claim(request);
    }
}
